package com.zbzly.reactive.reactiverbac.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

@RestController
@RequestMapping("/test")
public class ReactiveTestController {
    @GetMapping("/test")
    public Mono<String> test() {
        return Mono.just("test");
    }
    @GetMapping("/error")
    public Mono<String> error() {
        throw new RuntimeException("error");
//        return Mono.just("error");
    }
}
